/*
 * Copyright (C) 2015-2017 PÂRIS Quentin
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

@background-color: #f2f1f0;
@main-color: #e7e5e4;
@hover-color: rgba(223, 94, 30, 0.7);
@focus-color: #df5e1e;
@text-color: #6b6b6a;

/*******************************************************/
/*********************** general ***********************/
/*******************************************************/
* {
    -fx-background: @background-color;
    -fx-focus-color: @focus-color;
    -fx-faint-focus-color: @focus-color;
    -fx-text-fill: @text-color;
    -fx-text-base-color: @text-color;
    -fx-text-inner-color: @text-color;
    -fx-border-radius: 0.7em;
    -fx-background-radius: 0.7em;
}

.text {
    -fx-fill: @text-color;
}

.button {
    -fx-background-color: linear-gradient(#fdfdfd, #f1f0ef);
    -fx-border-color: @text-color;
    -fx-border-radius: 0.7em;
    -fx-background-radius: 0.7em;
}

.button:hover {
    -fx-border-color: @focus-color;
}

.combo-box {
    -fx-color: #bdc3c7;
    -fx-background-color: transparent;
    -fx-border-color: #bdc3c7;
    -fx-border-radius: 0.3em;
}

.combo-box:hover {
    -fx-border-color: @focus-color;
}

.combo-box .arrow-button {
    -fx-background-color: linear-gradient(#fdfdfd, #f6f6f5);
}

.combo-box:hover .arrow-button {
    -fx-color: @focus-color;
}

.combo-box-popup .list-view {
    -fx-background-color: @main-color, @main-color;
}

.combo-box .list-cell {
    -fx-background: @main-color;
    -fx-background-color: @main-color;
    -fx-background-radius: 0.3em 0 0 0.3em;
}

.combo-box-popup .list-view .list-cell:filled:hover {
    -fx-background-color: @focus-color;
}

.check-box {
    -fx-translate-x: 0.83em;
}

.check-box .box {
    -fx-background-color: transparent;
    -fx-border-color: #bdc3c7;
    -fx-background-radius: 0.3em;
    -fx-border-radius: 0.3em;
}

.check-box:hover .box {
    -fx-background-color: transparent;
    -fx-border-color: @focus-color;
}
.check-box:selected .box {
    -fx-background-color: linear-gradient(#d05420, #d77852);
    -fx-border-color: @focus-color;
}

.check-box:selected .mark {
    -fx-color: white;
    -fx-background-color: white;
}

.tab-header-area .tab-header-background {
    -fx-background-color: @main-color;
    -fx-background-radius: 0;
}

.tab-header-area .tab:selected {
    -fx-background-color: @focus-color;
    -fx-focus-color: transparent;
    -fx-faint-focus-color: transparent;
}

.tab-header-area .tab {
    -fx-background-radius: 0.7em 0.7em 0 0;
    -fx-background-color: @background-color;
    -fx-border-width: 0;
    -fx-background-opacity: 0;
    -fx-border-radius: 0;
}

.tab-header-area .tab:selected .tab-label .text {
    -fx-fill: white;
}

.list-view {
    -fx-background-color: @background-color;
    -fx-border-color: #bdc3c7;
}

.list-cell {
    -fx-background-color: @main-color;
    -fx-text-fill: @text-color;
}

.list-cell:even {
    -fx-background-color: @background-color;
    -fx-text-fill: @text-color;
}

.list-cell:filled:hover, .list-cell:filled:selected:focused, .list-cell:filled:selected {
    -fx-background-color: @focus-color;
    -fx-text-fill: @text-color;
}

.text-field {
    -fx-border-radius: 0.3em;
    -fx-background-radius: 0.3em;
    -fx-background-color: @main-color;
    -fx-border-color: transparent;
    -fx-text-fill: @text-color;
    -fx-focus-color: @focus-color;
}

.text-field:focused {
    -fx-border-color: @focus-color;
    -fx-text-fill: @text-color;
}

.text-field:hover {
    -fx-border-color: @focus-color;
    -fx-text-fill: @text-color;
}

.scroll-bar:horizontal {
    -fx-background-color:transparent;
    -fx-pref-height: 0.8em;
}

.scroll-bar:vertical {
    -fx-background-color:transparent;
    -fx-pref-width: 0.8em;
}

.increment-button, .decrement-button {
    -fx-background-color:transparent;
    -fx-border-color: transparent;
}

.scroll-bar:horizontal .track, .scroll-bar:vertical .track {
    -fx-background-color: #f1f1f1;
    -fx-border-color: transparent;
    -fx-background-radius: 0;
}

.scroll-bar:horizontal .thumb, .scroll-bar:vertical .thumb {
    -fx-background-color: #c1c1c1;
    -fx-background-insets: 0, 0, 0;
    -fx-background-radius: 0;
}

.scroll-bar:horizontal:hover .track,
.scroll-bar:horizontal:pressed .track,
.scroll-bar:vertical:hover .track,
.scroll-bar:vertical:pressed .track {
    -fx-background-color: #f1f1f1;
    -fx-border-color: transparent;
}

.scroll-bar .thumb:hover, .scroll-bar .thumb:pressed {
    -fx-background-color: @focus-color;
    -fx-border-color: transparent;
}

.increment-button:hover, .decrement-button:hover {
    -fx-background-color: transparent;
    -fx-border-color: transparent;
}

.increment-arrow, .decrement-arrow {
    -fx-background-color: #bdc3c7;
}

.increment-arrow:hover, .decrement-arrow:hover {
    -fx-background-color: @focus-color;
}

.progress-bar > .track {
    -fx-background-color: @main-color;
    -fx-background-insets: 0;
    -fx-background-radius: 0;
    -fx-padding: 0;
}

.progress-bar > .bar {
    -fx-background-color: @focus-color;
    -fx-background-insets: 0;
    -fx-background-radius: 0;
    -fx-padding: 0;
}

.tooltip {
    -fx-background-radius: 0.7em;
}

/*******************************************************/
/************************ menu *************************/
/*******************************************************/
#menuPane {
    -fx-tab-min-width: 7.5em;
}

#menuPane > .tab-header-area .tab-label {
    -fx-text-fill: #b4b1a9;
}

#menuPane > .tab-header-area .tab-header-background {
    -fx-background-color: #3c3b37;
}

#menuPane > .tab-header-area .tab:selected {
    -fx-border-color: @focus-color;
}

#menuPane > .tab-header-area .tab:selected .focus-indicator {
    -fx-border-style: hidden hidden hidden hidden;
}

/*******************************************************/
/*********************** sidebar ***********************/
/*******************************************************/
.sidebar {
    -fx-background-color: @main-color;
    -fx-padding: 0 0 0.83em 0;

    .sidebarScrollbar {
        -fx-background-color: @main-color;
    }

    .sidebarScrollbar > .viewport {
        -fx-background-color: @main-color;
    }

    .sidebarScrollbar .scroll-bar:vertical .track {
        -fx-background-color: #3c3f41;
        -fx-background-radius: 1em;
    }

    .sidebarScrollbar .scroll-bar:vertical .thumb {
        -fx-background-color: derive(black, 70%);
        -fx-background-radius: 0em;
    }

    .sidebarTitle {
        -fx-padding: 0.83em 0.83em 0.4em 0.83em;
        -fx-font-size: 1.2em;

        .text {
            -fx-fill: #3c3b37;
        }
    }

    .sidebarButton {
        -fx-border-color: transparent;
        -fx-border-radius: 0;
        -fx-background-radius: 0;
        -fx-label-padding: 0 1.5em 0 3.03em;
        -fx-background-position: 0.83em 0.1em;

        .text {
            -fx-fill: @text-color;
        }

        &:hover {
            -fx-border-color: transparent;
        }

        &:selected {
            -fx-background-color: linear-gradient(#ea6e3c, #f68152);
            -fx-border-color: transparent;
            -fx-background-radius: 0;

            .text {
                -fx-fill: white;
            }
        }
    }

    .sidebarCheckBox {
        -fx-label-padding: 0 1.5em 0 0.4em;
    }

    .searchBar {
        -fx-border-radius: 0;
        -fx-background-radius: 0;
        -fx-background-color: @background-color;
        -fx-border-color: transparent;
        -fx-text-fill: @text-color;
        -fx-focus-color: @focus-color;

        &:focused {
            -fx-border-color: transparent;
            -fx-text-fill: @text-color;
        }

        &:hover {
            -fx-border-color: @focus-color;
            -fx-text-fill: @text-color;
        }
    }

    .searchBox {
        .searchCleanButton {
            -fx-border-color: transparent;
        }
    }
}

/*******************************************************/
/************************ right ************************/
/*******************************************************/
.rightPane > .viewport {
    -fx-background-color: @background-color;
}

.detailsPane {
    -fx-background-color: @background-color;
}

/*******************************************************/
/*********************** library ***********************/
/*******************************************************/
.shortcutButton {
    -fx-border-color: transparent;
}

/*******************************************************/
/************************* apps ************************/
/*******************************************************/
.appPanelMiniaturesPane {
    -fx-background-color: @background-color;
    -fx-padding: 1em;
}

.appPanelMiniaturesPaneWrapper > .viewport {
    -fx-background-color: @background-color;
}

/********************** description ********************/
.descriptionTitle {
    -fx-text-fill: @focus-color;
}

/*******************************************************/
/********************** containers *********************/
/*******************************************************/
.containerConfigurationPane > .grid {
    -fx-padding: 1em;
    -fx-hgap: 1em;
    -fx-vgap: 1em;
    -fx-spacing: 1em;
}

/*******************************************************/
/********************** miniature **********************/
/*******************************************************/
.listWidget {
    .list-cell {
        &:hover {
            -fx-background-color: @hover-color;
        }

        &:selected {
            -fx-background-color: @focus-color;
        }
    }
}

.iconListWidget {
    .iconListElement {
        -fx-background-radius: 0.7em;

        &:hover {
            -fx-background-color: @hover-color;
        }

        &:selected {
            -fx-background-color: @focus-color;
        }

        .iconListMiniatureLabel {
            -fx-text-fill: @text-color;
        }
    }
}

.listChooser {
    -fx-translate-x: 0.83em;
    -fx-spacing: 0.2em;
    -fx-padding: 0;

    .listIcon {
        -fx-pref-width: 2em;
        -fx-pref-height: 2em;
        -fx-content-display: graphic-only;
        -fx-background-size: contain;
        -fx-background-repeat: no-repeat;
        -fx-background-position: center;
        -fx-background-color: transparent;
    }
}

/*******************************************************/
/***************** installation wizard *****************/
/*******************************************************/
#presentationBackground {
    -fx-background-color: @background-color;
    -fx-padding: 0.83em;
}

#presentationScrollPane {
    -fx-background: @background-color;
    -fx-border-color: @background-color;
}

#presentationTextTitle {
    -fx-fill: @text-color;
}

#presentationText {
    -fx-fill: @text-color;
}

/************************ step *************************/
#panelForTopheader {
    -fx-background-color: @background-color;
    -fx-border-color: transparent;
}

#header {
    -fx-border-color: @focus-color;
    -fx-background-color: @background-color;
}

#footer {
    -fx-border-color: #bdc3c7;
    -fx-border-style: solid hidden hidden hidden;
    -fx-border-width: 0.2em;
}

#stepScrollPane {
    -fx-background: @background-color;
    -fx-border-color: @background-color;
}

#stepText {
    -fx-fill: @text-color;
    -fx-font-size: 1.1em;
}

/*******************************************************/
/*********************** console ***********************/
/*******************************************************/
.console, console .viewport {
    -fx-background-color: @background-color;
}

.consoleCommandType {
    -fx-border-radius: 0.7em;
    -fx-background-color: @main-color;
    -fx-border-color: transparent;
    -fx-text-fill: @text-color;
}

.consoleCommandType:focused {
    -fx-border-radius: 0.7em;
    -fx-background-radius: 0;
    -fx-background-color: @main-color;
    -fx-border-color: @focus-color;
    -fx-text-fill: @text-color;
}

.consoleText {
    -fx-wrap-text: true;
    -fx-font-size: 0.85em;
}

.consoleText.normal {
    -fx-fill: @text-color;
}

.consoleText.default {
    -fx-fill: #bdc3c7;
}

.consoleText.error {
    -fx-fill: #da4453;
}

/*******************************************************/
/********************** wine tools *********************/
/*******************************************************/
.toolButton {
    -fx-border-color: transparent;
    -fx-background-color:transparent;
}

/*******************************************************/
/************************* misc ************************/
/*******************************************************/
.title {
    -fx-fill: @focus-color;
}

.captionTitle {
    -fx-fill: #3c3b37;
}